package com.zsck.pos.base;

public abstract class BasePresenter<V> {
    public V mvpView;
    private BaseModel baseModel;

    public abstract BaseModel getModel();

    public BasePresenter(V mvpView) {
        this.mvpView = mvpView;
        this.baseModel = getModel();
    }


    public void detachView() {
        this.mvpView = null;
        if (baseModel != null)
            baseModel.onUnsubscribe();
    }
}
